﻿namespace MS.Internal
{
    using System;
    using System.Diagnostics.CodeAnalysis;

    internal static class UriUtilities
    {
        internal static string GetLocalPath(Uri uri)
        {
            return Uri.UnescapeDataString(uri.LocalPath + uri.Fragment);
        }

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal static bool IsLocalPath(Uri uri)
        {
            return ((uri.IsAbsoluteUri && uri.IsFile) && !uri.IsUnc);
        }
    }
}

